<?php

class Locations
{
	private $locations=array();
	
	public function __construct()
	{
		$database=$GLOBALS['DATABASE']->Recopy();
		$sql = "SELECT LocationNameID, LongName, ShortName FROM LocationNames ORDER BY LongName";
		$database->executeSQL($sql);
		while($row=$database->getRow())
		{
			$eventLocation=array();
			$eventLocation['LongName']=$row['LongName'];
			$eventLocation['ShortName']=$row['ShortName'];
			$this->locations[$row['LocationNameID']]=$eventLocation;
		}
	}
	
	public function getLocations(){return $this->locations;}
	
}
